1. Field of Invention
The present invention relates to a digital color image sensor. More particularly, the present invention relates to a method and apparatus for dynamically determining whether a pixel value is correct and correcting it in real time.
2. Description of Related Art
Most of modern digital color camera systems use sensors, such as charge-coupled devices (CCDs) or CMOS sensors, to capture images. Generally, sensors convert incident light into electrical signals by the principle of electrons (or holes) being excited by photons transiting between different energy levels.
Sampling pixels for red, green and blue light are separately prepared for detecting different colors. For example, in the Bayer color filter array (CFA), which is usually used and can effectively decrease the sensor size, each sampling pixel in the array manages only one color, such as one of the primary colors (i.e. red, green and blue). In order to provide a complete color spectrum and enhance resolution, the sensor has to perform color interpolation to obtain two lacking colors for each sampling pixel.
In practice, certain sampling pixels, such as defective sampling pixels, may obtain wrong pixel values. If these wrong pixel values are not corrected, they will affect image quality. The simple conventional correction method includes testing sampling pixels before leaving the factory, recording positions of defective sampling pixels, and adding additional corrections for pixel values corresponding to the defective sampling pixels in a subsequent data process.
However, the conventional correction method fails to correct problems that do not happen during manufacture of the sampling pixels. These problems include, for example, defective pixels generated by long-time use or by old devices, wrong pixel values obtained due to dust-covered lenses, and different defective pixel positions occurring due to exchanging sensor heads.
U.S. patent application publication No. 2004/0032516 A1 disclosed a “digital image system and method for combining demosaicing and bad pixel correction”, which interpolates sensor values for pixels immediately spatially adjacent to the current pixel being examined to detect defective pixels and uses the interpolated values for demosaicing. However, the conventional technique disclosed by the patent application entails complicated circuitry and enormous computational effort such that a high-speed operating system is needed, increasing design and manufacturing costs. Moreover, an image derived by the conventional technique is blurred and vague because the image is processed by too many operations.